<%@page pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp"%>

<script>
   
    function jsReadCard(){
        var axReadID1 = document.all("axReadID");
        //打开读卡器
        axReadID1.OpenComm();
        try{  
          alert("身份证号码:" + axReadID1.PeopleIDCode());
          alert("地址:" + axReadID1.PeopleAddress());
          alert("生日:" + axReadID1.PeopleBirthday());
          alert("名称:" + axReadID1.PeopleName());
          alert("性别:" + axReadID1.PeopleSex());
                  
          $id("grescidnumber").value = axReadID1.PeopleIDCode();	//读取身份证号码
          $id("grescaddress").value = axReadID1.PeopleAddress();	//读取地址
          $id("gresdbirthday").setValue(axReadID1.PeopleBirthday());//读取生日
          $id("grescguestname").setValue(axReadID1.PeopleName());	//读取名称
          $id("grescsex").setValue(axReadID1.PeopleSex());			//客人性别
          $id("grescidtype").value = "id";
          
          //同时将
        }catch(e){
          alert(e.message);
        }finally        {
          //关闭读卡器
          axReadID1.Close();
        }
    }
    
</script>

    <div style="display: none;">
      <object id="axReadID" classid="clsid:d71ba598-6217-47e7-8221-7d9a333ce35e" width="110px" height="30px"></object>
    </div>
    
          <table align="center" border="0" width="100%" class="form_table">
            <tr>
              <td class="form_label">
                房间号码
              </td>
              <td colspan="1">
                <h:text name="checkinInfo" style="width:200px;" readonly="true"  id="gresroomno" readonly="true"/>
              </td>
              <td class="form_label">
                抵店日期
              </td>
              <td colspan="1">
                <w:date  name="checkinInfo"  style="width:200px;"  format="yyyy-MM-dd HH:mm:ss" id="gresdarrdate" readOnly="true"/>
              </td>
              <td class="form_label">
                离店日期
              </td>
              <td colspan="1">
                <w:date  name="checkinInfo" style="width:200px;"  format="yyyy-MM-dd HH:mm:ss" id="gresddepdate" readOnly="true"/>
              </td>
            </tr>
            
            <tr>
              <td class="form_label">
              入住人姓名  
              </td>
              <td colspan="1">
                <h:text  name="checkinInfo"   style="width:200px;" id="grescguestname" /><font style="color:red">*</font>
              </td>
              <td class="form_label">
                性别 
              </td>
              <td colspan="1">
               <d:select  name="checkinInfo" dictTypeId="gender" id="grescsex" />
              </td>
              <td class="form_label" >
                生日
              </td>
              <td colspan="1">
                <w:date  name="checkinInfo" style="width:200px;" id="gresdbirthday" allowInput="false" />
              </td>
            </tr>
            
            <tr>
              <td class="form_label">
                证件类型
              </td>
              <td colspan="1">
                <d:select  name="checkinInfo" dictTypeId="ABF_CARDTYPE" style="width:200px;" id="grescidtype"/><font style="color:red">*</font>
              </td>
              <td class="form_label">
                证件号码
              </td>
              <td colspan="1">
                <h:text   name="checkinInfo" style="width:200px;" id="grescidnumber"/><font style="color:red">*</font>
                <input type="button" value="读卡" onclick="jsReadCard()" class="button">
              </td>
              <td class="form_label">
                联系地址
              </td>
              <td colspan="1">
                <h:text   name="checkinInfo" style="width:100%;"  id="grescaddress"/>
              </td>              
            </tr>            
            
            <tr>
              <td class="form_label">
                电话
              </td>
              <td colspan="1">
                <h:text  name="checkinInfo"  style="width:200px;"  id="gresctel"/>
              </td>
              <td class="form_label">
                EMAIL
              </td>
              <td colspan="1">
                <h:text  name="checkinInfo"  style="width:200px;"  id="grescemail"/>
              </td>
              <td class="form_label">
                手机
              </td>
              <td colspan="1">
                <h:text  name="checkinInfo"  style="width:200px;"  id="grescmobile"/>
              </td>              
            </tr>  

            <tr>
               <td class="form_label">
                  特殊要求
               </td>
              <td colspan="5" style="color:blue">
                 <h:textarea  name="checkinInfo" style="width:100%;" id="grescdescription"/>
              </td>               
            </tr>     
            
            <tr>
               <td class="form_bottom" colspan="6">
                  <input type="button" class="button" value="入住" id='btnCheckIn' >  
                  <input type="button" class="button" value="换房" id='btnChangeRoom' onclick="changeRoom()">  
                  <input type="button" class="button" value="留言" id='btnMsg' onclick="guestMsg()">  
                  <input type="button" class="button" value="寄存" id='btnStorage' onclick="guestStorage()" >  
                  <input type="button" class="button" value="租借" id='btnLoan' onclick="guestLoan()">  
                  <input type="button" class="button" value="遗留物品" id='btnLost' onclick="guestLost()">  
               </td>            
            </tr> 
                               
          </table>